package com.apollo.test;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class Sentinel4NacosConfig {

    @Value("${spring.application.name}")
    private String applicationName;

    @Value("${nacos.url}")
    private String url;


    @Bean
    public NacosDataSourceListener nacosDataSourceListener() {
        return new NacosDataSourceListener(applicationName, url);
    }

}
